#ifndef DSPSIMULATOR_TARGETMACHINE_H
#define DSPSIMULATOR_TARGETMACHINE_H

#include <memory>
#include <utility>
#include <simulator/targetMachine/registerMap.h>
#include <simulator/targetMachine/memoryManageUnit.h>

class TargetMachine {
protected:
    std::shared_ptr<MMU> m_mmu;
    std::shared_ptr<RegisterMap> m_regs;
public:
    TargetMachine() :
            m_mmu(std::make_shared<MMU>()), m_regs(std::make_shared<RegisterMap>()) {};

    virtual ~TargetMachine() = default;

    TargetMachine(const TargetMachine &) = delete;

    TargetMachine &operator=(const TargetMachine &) = delete;

    std::shared_ptr<MMU> getMMU() { return m_mmu; };

    void updateMMU(std::shared_ptr<MMU> mmu) {
        m_mmu = mmu;
    }

    void updateRegisterMap(std::shared_ptr<RegisterMap> regs) {
        m_regs = regs;
    }

    std::shared_ptr<RegisterMap> getRegisters() { return m_regs; };
};

#endif //DSPSIMULATOR_TARGETMACHINE_H
